using System;
using System.Text;
using System.Data;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using PlugNT.Cms.Custom;
using PlugNT.Common;
using PlugNT.Cms.Model;
using PlugNT.Cms.BLL;
using PlugNT.Cms.Page;

namespace PlugNT.App.UCenter.Web
{

    public partial class Uc_Info : SitePager
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (IsLogined())
                {
                    InitData();
                }
                else
                {
                    Response.Redirect("./login.aspx");
                }
            }
            this.AssignData("copyright", PlugNT.Cms.Utility.DataHelper.CreateCopyright(PlugNT.App.UCenter.UcConfig.assName, PlugNT.App.UCenter.UcConfig.assVersion));
        }

        private void InitData()
        {
            this.AssignData("mark", "");
            this.AssignData("pic", "/templets/default/images/default.jpg");
            string uid = Request.QueryString["uid"] == null ? "" : Request.QueryString["uid"];
            if (uid != "")
            {
                DataRow dr=PlugNT.Cms.BLL.User.GetUserDataRow(uid);
                if (dr != null)
                {
                    this.AssignData("mark", dr[WebConfig.GetUserField("mark")].ToString());
                    this.AssignData("pic", dr[WebConfig.GetUserField("pic")].ToString() == "" ?
                        "/templets/default/images/default.jpg" : dr[WebConfig.GetUserField("pic")].ToString());
                }
            }
        }


    }
}

